<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style>
		
	</style>
</head>
<body>
	
</body>
	<script>
		var list = ['静静','贱贱','嘻嘻','哈哈','舒舒','艳艳','波波'];

		//for
		for(var i=0;i<list.length;i++){
			console.log(i,list[i]);
		}
		document.write('<hr>');

		//for-in
		for (var i in list) {
			console.log(i,list[i]);
		}

		//遍历对象
		var obj = {name:'卡卡',age:40,sex:'男'};
		for(var i  in obj){
			console.log(i,obj[i]);
		}

	</script>
</html>